import request from '@/utils/request.js'

const state = {
  collector: []
}
const mutations = { // 操作数据
  setcollector (state, payload) {
    state.collector = payload
  }
}
const actions = {
  async onsetcollector (context, payload) {
    const res = await request({
      url: '/user/favorites'
    })
    console.log(res)
    context.commit('setcollector', res.data.body)
  }
}
const getters = {

}
export default {
  namespaced: true,
  state,
  mutations,
  actions,
  getters
}
